package com.dxf.bigdata.D05_spark_again.action

import org.apache.spark.{SparkConf, SparkContext}

object 序列化 {

  def main(args: Array[String]): Unit = {

    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("app")
    sparkConf.set("spark.port.maxRetries","100")
    sparkConf.set("spark.serializer","org.apache.spark.serializer.KryoSerializer")

    val sc = new SparkContext(sparkConf)


    val stu = new Stu()

    val value = sc.makeRDD(List(("a",stu),("b",2),("a",3)),2)

    value.saveAsTextFile("output7")


    sc.stop()
  }

  case class Stu(){
    val int:Int = 10
  }

}
